package com.ruoyi.project.system.achievement.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.achievement.mapper.ArticleAchievementMapper;
import com.ruoyi.project.system.achievement.domain.ArticleAchievement;
import com.ruoyi.project.system.achievement.service.IArticleAchievementService;
import com.ruoyi.common.utils.text.Convert;

/**
 * achievementService业务层处理
 * 
 * @author admin
 * @date 2025-04-24
 */
@Service
public class ArticleAchievementServiceImpl implements IArticleAchievementService 
{
    @Autowired
    private ArticleAchievementMapper articleAchievementMapper;

    /**
     * 查询achievement
     * 
     * @param id achievement主键
     * @return achievement
     */
    @Override
    public ArticleAchievement selectArticleAchievementById(Long id)
    {
        return articleAchievementMapper.selectArticleAchievementById(id);
    }

    /**
     * 查询achievement列表
     * 
     * @param articleAchievement achievement
     * @return achievement
     */
    @Override
    public List<ArticleAchievement> selectArticleAchievementList(ArticleAchievement articleAchievement)
    {
        return articleAchievementMapper.selectArticleAchievementList(articleAchievement);
    }

    /**
     * 新增achievement
     * 
     * @param articleAchievement achievement
     * @return 结果
     */
    @Override
    public int insertArticleAchievement(ArticleAchievement articleAchievement)
    {
        return articleAchievementMapper.insertArticleAchievement(articleAchievement);
    }

    /**
     * 修改achievement
     * 
     * @param articleAchievement achievement
     * @return 结果
     */
    @Override
    public int updateArticleAchievement(ArticleAchievement articleAchievement)
    {
        return articleAchievementMapper.updateArticleAchievement(articleAchievement);
    }

    /**
     * 批量删除achievement
     * 
     * @param ids 需要删除的achievement主键
     * @return 结果
     */
    @Override
    public int deleteArticleAchievementByIds(String ids)
    {
        return articleAchievementMapper.deleteArticleAchievementByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除achievement信息
     * 
     * @param id achievement主键
     * @return 结果
     */
    @Override
    public int deleteArticleAchievementById(Long id)
    {
        return articleAchievementMapper.deleteArticleAchievementById(id);
    }
}
